package ru.duma.core;

/**
 * @author  AdminCPP  
 * Base class for all classes
 */
public class AIID {

	private static long currentID = 0;
	
	private String value;

	synchronized protected static void reset() {
		currentID = 0;
	}
	
	synchronized protected static String getID() {
		++currentID;
		return Long.toString(currentID);
	}
	
	public AIID() {
		value = getID();
	}
	
	public String getValue() {
		return value;
	}
	
	@Override
	public String toString() {
		return value;
	}
	
}
